//
//  PlayerProtocol.h
//  PacIsBack
//
//  Created by Jérémy Brault on 14/12/09.
//  Copyright 2009 None. All rights reserved.
//

@protocol BattleTeamProtocol;
@protocol BattleProtocol;
@protocol ExperienceTableProtocol;
@protocol StatsTableProtocol;
@protocol SkillsGainedTableProtocol;



@class CharacterViewController;

@protocol CharacterProtocol <NSObject>

#pragma mark -
#pragma mark Player's HP management

- (NSUInteger)currentHP;

- (void)setCurrentHP:(NSUInteger)currentHP;

- (NSUInteger)maxHP;

- (void)setMaxHP:(NSUInteger)maxHP;

#pragma mark -
#pragma mark Player's MP management

- (NSUInteger)currentMP;

- (void)setCurrentMP:(NSUInteger)currentMP;

- (NSUInteger)maxMP;

- (void)setMaxMP:(NSUInteger)maxMP;

#pragma mark -
#pragma mark Player's XP management

- (NSInteger) level;

- (void) gainExperience:(NSInteger) experienceValue;

- (void) gainLevel;

- (void) gainHpMax:(NSInteger) value;

- (void) gainMpMax:(NSInteger) value;

- (void) gainStrengh:(NSInteger) value;

- (void) gainAgility:(NSInteger) value;

- (void) gainVitality:(NSInteger) value;

- (void) gainDefence:(NSInteger) value;

- (void) gainIntelligence:(NSInteger) value;

- (void) gainWisdom:(NSInteger) value;

- (void) gainLuck:(NSInteger) value;

- (void) gainSkills:(NSArray*) skills;

- (void) gainExpReward:(NSInteger) value;

- (NSUInteger)currentXP;

- (id<ExperienceTableProtocol>) experienceTable;

- (id<StatsTableProtocol>) statsTable;

- (id<SkillsGainedTableProtocol>) skillsTable;

#pragma mark -
#pragma mark Player's habilities management

- (NSUInteger)strength;

- (void)setStrength:(NSUInteger)strength;

- (NSUInteger)agility;

- (void)setAgility:(NSUInteger)agility;

- (NSUInteger)vitality;

- (void)setVitality:(NSUInteger)vitality;

- (NSUInteger)defense;

- (void)setDefense:(NSUInteger)defense;

- (NSUInteger)intelligence;

- (void)setIntelligence:(NSUInteger)intelligence;

- (NSUInteger)wisdom;

- (void)setWisdom:(NSUInteger)wisdom;

- (NSUInteger)speed;

- (void)setSpeed:(NSUInteger)speed;

- (NSUInteger)luck;

- (void)setLuck:(NSUInteger)luck;

- (NSInteger) experienceReward;

- (NSArray*) availableSkills;

#pragma mark -
#pragma mark Character's calculated datas

-(NSInteger) attackPower;

-(NSInteger) receiveAttack:(NSInteger) originAttackPower;

#pragma mark -
#pragma mark Character's others datas

- (BOOL) isAlive;

- (BOOL) isSelected;

- (NSString*) characterType;

- (void) setCharacterType:(NSString*) characterType;

- (id<BattleProtocol>) currentBattle;

- (id<BattleTeamProtocol>) team;

- (void) setTeam:(id<BattleTeamProtocol>) team;

- (BOOL) manualyPlayed;

- (void) setManualyPlayed:(BOOL) manualyPlayed;

- (BOOL) hasPlayed;

- (void) setHasPlayed:(BOOL) hasPlayed;

- (CharacterViewController*) battleController;

- (void) setBattleController:(CharacterViewController*) battleController;

- (NSComparisonResult) isFasterThan:(id<CharacterProtocol>) compared;

#pragma mark -
#pragma mark Actions on character

-(void) regenerationTick;

-(void) trySelecting;

-(void) select;

-(void) unselect;

-(void) doAction;

-(void) recreateBattleController;

-(void) useMP:(NSInteger) cost;
@end
